<!doctype html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
        <meta name="renderer" content="webkit">
        <meta http-equiv="Cache-Control" content="no-siteapp"/>
        <title>店面导航</title>
		<link rel="stylesheet" href="/Public/Wap/hpf/css/Hpfstyle.css?r={:rand(10,100)}" />
        <script type="text/javascript" src="/Public/Member/js/jquery.min.js"></script>
		<!--<link rel="stylesheet" href="/Public/Member/css/base.css">-->
        <script>
            function getStore(bid) {
                var keyword = $("input[name='keyword']").val().trim();
                var bid = bid;
                if (bid == "") {
                    bid = "{$Think.get.bid}";
                    alert(bid);
                }
                window.location.href = "index.php?s=/Wap/Store/index_do/bid/" + bid + "/keyword/" + keyword;
            }
            var page = 1;
            var bid = 1;
            $(window).scroll( function() {
		          totalheight = parseFloat($(window).height()) + parseFloat($(window).scrollTop());     //浏览器的高度加上滚动条的高度
		          if ($(document).height() <= totalheight)     //当文档的高度小于或者等于总的高度的时候，开始动态加载数据
		          {
                      page ++;
                      var keyword = $("input[name='keyword']").val().trim();

                      $(".load").show();
                      //查询新的数据
                      $.get("{:U('')}",{indexpage:page,bid:bid,keyword:keyword},function(data){
                          if(!data)
                          {
                            $(".load").text('数据加载完成');
                          }else{
                            $(".load").text('数据加载中');
                          }
                          $(".load").hide();
                          //加载数据
                          $(".pic-text-ul").append(data);

                      },"html");

		          }
		     });
            $(function(){
                $(".changbrand").click(function(){
                    page = 1;
                    $(this).addClass("sjsTj").siblings('li').removeClass('sjsTj');
                    bid = $(this).attr("bid");
                    var keyword = $("input[name='keyword']").val().trim();
                    $.get("{:U('')}",{indexpage:1,bid:bid,keyword:keyword},function(data){
                        //加载数据
                        if(!data)
                          {
                            $(".load").text('数据加载完成');
                          }else{
                            $(".load").text('数据加载中');
                          }
                        $(".pic-text-ul").html(data);
                    },"html");
                });
            })

        </script>
    </head>

    <body style="background-color: #efefef;">
            <ul class="sjsTjtop">
            <volist name="brand" id="vo" key="i">
		        <li class="changbrand <if condition='$i eq 1'>sjsTj</if>" bid="{$vo.id}">
                <a><label>{$vo.bname}</label></a>

                </li>
		    </volist>
		    </ul>

    <div class="search">
        <form action="{:U('Store/index_do',array('bid'=>$_GET['bid']))}" method="post">
            <input class="ikey" type="text" name="keyword" placeholder="请输入门店名称">
        </form>
    </div>
            <ul class="pic-text-ul">
    <include file="Store/storelist"/>
</ul>


<div class="load" style="text-align: center; color: #666; font-size: 1rem; line-height: 2rem; height: 2rem; position: fixed; bottom: 0; left: 0; width: 100%; background: url(/Public/Wap/hpf/images/html_bg.png) repeat;display: none;"> 
    数据加载中...
</div>

</body>
</html>  